package com.cskaoyan._03memory;

/**
 * @description:
 * @author: 景天
 * @date: 2023/2/1 10:58
 **/
/*
String的比较
 */
public class Demo5 {
    public static void main(String[] args) {
        int a = 1;
        int b = 2;
        System.out.println(a == b);

        String s1 = "abc";
        String s2 = "abc";
        // 引用数据类型==比较的是对象地址值
        System.out.println(s1 == s2);

        //String s2 = new String("abc");
        //System.out.println(s1 == s2);

        // String比较内容的时候用equals方法
    }
}
